1600 |
How do I set a computated cell individually
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Number'); Columns.Add('Format'); with Items do begin h := AddItem('1.23'); CellValueFormat[TObject(h),TObject(1)] := EXG2ANTTLib.ValueFormatEnum.exComputedField; CellValue[TObject(h),TObject(1)] := '2 * %0 + ` (2 * Number)`'; h := AddItem('1.23'); CellValueFormat[TObject(h),TObject(1)] := EXG2ANTTLib.ValueFormatEnum.exComputedField; CellValue[TObject(h),TObject(1)] := '3 * %0 + ` (3 * Number)`'; h := AddItem('1.23'); CellValueFormat[TObject(h),TObject(1)] := EXG2ANTTLib.ValueFormatEnum.exComputedField; CellValue[TObject(h),TObject(1)] := 'currency(%0) + ` ( Currency(Number) )`'; end; EndUpdate(); end |
1599 |
How can I hide a specific hour
with AxG2antt1 do begin BeginUpdate(); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; Columns.Add('Default'); with Chart do begin AllowInsideZoom := True; FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday; FirstVisibleDate := '3/31/2013'; PaneWidth[False] := 52; LevelCount := 2; UnitScale := EXG2ANTTLib.UnitEnum.exHour; Level[1].Label := '<font ;6><%h%></font>'; UnitWidth := 14; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; AllowInsideZoom := True; DefaultInsideZoomFormat.InsideUnit := EXG2ANTTLib.UnitEnum.exMinute; AllowResizeInsideZoom := False; InsideZoomOnDblClick := False; with InsideZooms do begin SplitBaseLevel := False; DefaultWidth := 0; end; with InsideZooms do begin Add('3/31/2013 11:00:00 PM'); end; end; with Items do begin AddItem('Item'); end; EndUpdate(); end |
1598 |
Is it possible to define the keys of the drop down values to be strings rather than numeric values
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent); begin with AxG2antt1 do begin OutputDebugString( 'NewValue is' ); OutputDebugString( e.newValue ); end end; with AxG2antt1 do begin with (Columns.Add('DropDownList-String') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType; AddItem(1,'NYC|New York City',Nil); AddItem(2,'CJN|Cluj Napoca',Nil); end; with (Columns.Add('DropDownList-Numeric') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType; AddItem(1,'New York City',Nil); AddItem(2,'Cluj Napoca',Nil); end; with Items do begin CellValue[TObject(AddItem('NYC')),TObject(1)] := TObject(2); end; end |
1597 |
I have an edit field, when going to edit mode, the rightmost part is shown. Is it possible to show the left part instead
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Edit') as EXG2ANTTLib.Column) do begin Width := 64; AllowSizing := False; with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := ';;;rich'; end; end; Columns.Add('Empty'); with Items do begin AddItem('This is a bit ot long text'); AddItem(''); end; EndUpdate(); end |
1596 |
I have a drop down field, the control shows the rightmost part of the selected caption. Is it possible to show the left part
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('DropDown') as EXG2ANTTLib.Column) do begin Width := 64; AllowSizing := False; with Editor do begin DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20); EditType := EXG2ANTTLib.EditTypeEnum.DropDownType; AddItem(1,'First item. This is a bit ot long text',Nil); AddItem(2,'Second item. This is a bit ot long text',Nil); AddItem(3,'Third item. This is a bit ot long text',Nil); Mask := ';;;rich'; end; end; with (Columns.Add('PickEdit') as EXG2ANTTLib.Column) do begin Width := 64; AllowSizing := False; with Editor do begin DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20); EditType := EXG2ANTTLib.EditTypeEnum.PickEditType; AddItem(1,'First item. This is a bit ot long text',Nil); AddItem(2,'Second item. This is a bit ot long text',Nil); AddItem(3,'Third item. This is a bit ot long text',Nil); Mask := ';;;rich'; end; end; Columns.Add('Empty'); with Items do begin CellValue[TObject(AddItem('First item. This is a bit ot long text')),TObject(1)] := 'Second item. This is a bit ot long text'; h := AddItem('First item. This is a bit ot long text'); with CellEditor[TObject(h),TObject(0)] do begin DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20); EditType := EXG2ANTTLib.EditTypeEnum.DropDownType; AddItem(1,'First item. This is a bit ot long text',Nil); AddItem(2,'Second item. This is a bit ot long text',Nil); AddItem(3,'Third item. This is a bit ot long text',Nil); end; CellValue[TObject(h),TObject(1)] := 'Second item. This is a bit ot long text'; with CellEditor[TObject(h),TObject(1)] do begin DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20); EditType := EXG2ANTTLib.EditTypeEnum.PickEditType; AddItem(1,'First item. This is a bit ot long text',Nil); AddItem(2,'Second item. This is a bit ot long text',Nil); AddItem(3,'Third item. This is a bit ot long text',Nil); end; end; EndUpdate(); end |
1595 |
Is there a property for the back color of the dropdown field
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Date') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Option[EXG2ANTTLib.EditorOptionEnum.exDropDownBackColor] := TObject(15790320); Option[EXG2ANTTLib.EditorOptionEnum.exDropDownForeColor] := TObject(65793); end; Items.AddItem('1/1/2001'); EndUpdate(); end |
1594 |
Is it possible to change a back color of the field/cell when it takes a focus
// EditClose event - Occurs when the edit operation ends. procedure TWinForm1.AxG2antt1_EditCloseEvent(sender: System.Object; e: System.EventArgs); begin with AxG2antt1 do begin with Items do begin ClearCellBackColor(TObject(FocusItem),TObject(AxG2antt1.FocusColumnIndex)); end; end end; // EditOpen event - Occurs when the edit operation starts. procedure TWinForm1.AxG2antt1_EditOpen(sender: System.Object; e: System.EventArgs); begin with AxG2antt1 do begin with Items do begin CellBackColor[TObject(FocusItem),TObject(AxG2antt1.FocusColumnIndex)] := $ff; end; with Items do begin CellValue[TObject(FocusItem),TObject(AxG2antt1.FocusColumnIndex)] := AxG2antt1.Items.CellValue[TObject(AxG2antt1.Items.FocusItem),TObject(AxG2antt1.FocusColumnIndex)]; end; end end; with AxG2antt1 do begin FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel; (Columns.Add('C1') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; (Columns.Add('C2') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; with Items do begin CellValue[TObject(AddItem('v1')),TObject(1)] := 'v2'; CellValue[TObject(AddItem('v3')),TObject(1)] := 'v4'; end; end |
1593 |
How can I display the current date mask, but still allow empty values
with AxG2antt1 do begin BeginUpdate(); CauseValidateValue := EXG2ANTTLib.ValidateValueType.exValidateCell; FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; with (Columns.Add('Date') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!99/99/9999;1;;empty=1,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,' + 'select=4,overtype'; end; with Items do begin AddItem(Nil); AddItem('1/1/2001'); AddItem(Nil); end; EndUpdate(); end |
1592 |
How can I align the days in a DateType editor
with AxG2antt1 do begin Columns.Add('DropDown'); with Items do begin with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum.RightAlignment; end; with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; end; with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment; end; with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20); end; with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20 Or Integer(EXG2ANTTLib.AlignmentEnum.CenterAlignment)); end; with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20 Or Integer(EXG2ANTTLib.AlignmentEnum.RightAlignment)); end; end; end |
1591 |
How can I align the drop down portion rather the inside captions
with AxG2antt1 do begin (Columns.Add('DropDown') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType; with Items do begin with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum($20); end; with CellEditor[TObject(AddItem('1/1/2001')),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; DropDownAlignment := EXG2ANTTLib.AlignmentEnum.exHOutside; end; AddItem('1/1/2001'); end; end |
1590 |
Is it possible to show a message that the field is empty
with AxG2antt1 do begin DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel; with (Columns.Add('Float') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := ';;;float,digits=0,grouping=,invalid=empty,warning=invalid character'; end; end; Items.AddItem(TObject(192278)); Items.AddItem(TObject(1000)); end |
1589 |
How can I mask a date
with AxG2antt1 do begin BeginUpdate(); CauseValidateValue := EXG2ANTTLib.ValidateValueType.exValidateCell; FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; Columns.Add('Date'); Columns.Add('Mask'); with Items do begin h := AddItem('1/1/2001'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '{1,12}/{1,31}/{1950,2050};1;;select=1,warning=Invalid character!,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>' + '!,validateas=1'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!99/99/9999;1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,se' + 'lect=4,overtype'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!99/99/9999;;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,sel' + 'ect=4,overtype'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!99/99/9999;; ;select=4,overtype,empty,warning=Invalid character!,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b' + '>!,validateas=1'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '![0-9 ][0-9 ]/[0-9 ][0-9 ]/[0-9 ][0-9 ][0-9 ][0-9 ];1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%ma' + 'sk%>''</b>!,warning=Invalid character!,select=4,leading= '; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); FormatCell[TObject(h),TObject(0)] := 'len(value) ? shortdateF(value) : ``'; with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!99/99/9999;1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,se' + 'lect=4,overtype,leading'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); FormatCell[TObject(h),TObject(0)] := 'len(value) ? shortdateF(value) : ``'; with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!00/00/0000;1;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,se' + 'lect=4,overtype,leading'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); FormatCell[TObject(h),TObject(0)] := 'len(value) ? shortdateF(value) : ``'; with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!00/00/0000;;0;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,se' + 'lect=4,overtype'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); h := AddItem('1/1/2001'); FormatCell[TObject(h),TObject(0)] := 'len(value) ? shortdateF(value) : ``'; with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '!00/00/0000;;;empty,validateas=1,invalid=Invalid date\, for the input mask <br><b>''<%mask%>''</b>!,warning=Invalid character!,sel' + 'ect=1,overtype'; end; CellValue[TObject(h),TObject(1)] := TObject(CellEditor[TObject(h),TObject(0)].Mask); end; EndUpdate(); end |
1588 |
How can I display and edit an integer number to show grouping digits too ( no decimals)
with AxG2antt1 do begin with (Columns.Add('Float') as EXG2ANTTLib.Column) do begin FormatColumn := 'value format `0`'; with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := ';;;float,digits=0'; end; end; Items.AddItem(TObject(192278)); end |
1587 |
How can I display and edit a float number to show grouping digits too
with AxG2antt1 do begin with (Columns.Add('Float') as EXG2ANTTLib.Column) do begin FormatColumn := 'value format ``'; with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := ';;;float'; end; end; Items.AddItem(TObject(192278)); end |
1586 |
How can I mask a phone number
with AxG2antt1 do begin CauseValidateValue := EXG2ANTTLib.ValidateValueType.exValidateCell; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel; (Columns.Add('Phone') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.MaskType; with Items do begin h := AddItem(Nil); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := '!(999) 000 0000;1;;select=1,empty,overtype,warning=invalid characer,invalid=The value you entered isn''t appropriate for the inpu' + 't mask <b>''<%mask%>''</b> specified for this field.'; end; h := AddItem('0123'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := '!(999) 000 0000;2;;select=4'; end; h := AddItem('0123'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := '`Phone: `!(999) 000-0000'; end; h := AddItem('(074) 876-1222'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.MaskType; Mask := '!(999) 000-0000;0'; end; end; end |
1585 |
Is it possible to display the ColorType fields using RGB format
with AxG2antt1 do begin (Columns.Add('Color') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.ColorType; with Items do begin AddItem(TObject(255)); h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := '`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0'; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := '`&H`XXXXXXXX`&`;;0;overtype,insertype,warning=Wrong!'; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := '`0x`XX `0x`XX `0x`XX;;0;overtype,insertype,warning=Wrong!'; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := 'R{0,255} G{0,255} B{0,255};;0;overtype,insertype,warning=Wrong!'; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := '`(hexa) RGB 0x`XXXXXX;;0;overtype,insertype,warning=Wrong!'; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := '`(decimal) Red: `{0,255}` Green: `{0,255}` Blue: `{0,255};;0;overtype,insertype,warning=Wrong!'; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXG2ANTTLib.EditTypeEnum.ColorType; Mask := '`(combine) Red: `{0,255}` Green: 0x`XX` Blue: `{0,255};;0;overtype,insertype,warning=Wrong!'; end; end; end |
1584 |
How can I specify a different color for bars that cross over the non-working part of the chart
with AxG2antt1 do begin Columns.Add('Task'); with Chart.Bars do begin Copy('Task','STask').Color := $ff; Add('Task:STask').Shortcut := 'TS'; end; with Chart do begin PaneWidth[False] := 96; FirstVisibleDate := '1/1/2001'; NonworkingDaysColor := Bars.Item['STask'].Color; end; with Items do begin AddBar(AddItem('Task 1'),'TS','1/2/2001','1/16/2001',Nil,Nil); end; end |
1583 |
How can I merge two columns
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.CellMerge[TObject(e.item),TObject(0)] := TObject(1); end end; with AxG2antt1 do begin MarkSearchColumn := False; TreeColumnIndex := -1; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; (Columns.Add('C1') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False); Columns.Add('C2'); Columns.Add('C3'); with Items do begin AddItem('This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.'); AddItem('This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.'); end; end |
1582 |
How can I expand an item once the user clicks the column's checkbox
// CellStateChanged event - Fired after cell's state has been changed. procedure TWinForm1.AxG2antt1_CellStateChanged(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEvent); begin with AxG2antt1 do begin with Items do begin ExpandItem[e.item] := False; end; end end; with AxG2antt1 do begin BeginUpdate(); with Columns do begin with (Add('') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); AllowSizing := False; Width := 18; PartialCheck := True; end; Add('Tasks'); end; ShowFocusRect := False; HasButtons := EXG2ANTTLib.ExpandButtonEnum.exNoButtons; TreeColumnIndex := 1; Indent := 14; ExpandOnDblClick := False; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; with Items do begin h := AddItem(''); CellState[TObject(h),TObject(0)] := 1; CellValue[TObject(h),TObject(1)] := 'Project'; hChild := InsertItem(h,Nil,''); CellValue[TObject(hChild),TObject(1)] := 'Task 1'; hChild := InsertItem(h,Nil,''); CellValue[TObject(hChild),TObject(1)] := 'Task 2'; ExpandItem[h] := True; end; EndUpdate(); end |
1581 |
How can I define a column with check-box
with AxG2antt1 do begin BeginUpdate(); with Columns do begin with (Add('') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); AllowSizing := False; Width := 18; PartialCheck := True; end; Add('Tasks'); end; ShowFocusRect := False; HasButtons := EXG2ANTTLib.ExpandButtonEnum.exNoButtons; TreeColumnIndex := 1; Indent := 14; ExpandOnDblClick := False; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; with Items do begin h := AddItem(''); CellState[TObject(h),TObject(0)] := 1; CellValue[TObject(h),TObject(1)] := 'Project'; hChild := InsertItem(h,Nil,''); CellValue[TObject(hChild),TObject(1)] := 'Task 1'; hChild := InsertItem(h,Nil,''); CellValue[TObject(hChild),TObject(1)] := 'Task 2'; ExpandItem[h] := True; end; EndUpdate(); end |
1580 |
We need to know how it's possibile to have the bars on the same line and not in a different line
with AxG2antt1 do begin BeginUpdate(); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; with Chart do begin DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; FirstVisibleDate := '1/1/2002'; Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack); PaneWidth[False] := 128; end; Columns.Add('Task'); with Items do begin h := AddItem('Tasks'); AddBar(h,'Task','1/2/2002','1/7/2002','A',Nil); AddBar(h,'Task','1/3/2002','1/8/2002','B',Nil); AddBar(h,'Task','1/4/2002','1/9/2002','C',Nil); ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); AddLink('AB',h,'A',h,'B'); AddLink('BC',h,'B',h,'C'); end; EndUpdate(); end |
1579 |
The Change event gets me the today date. How can I find what user typed
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent); begin with AxG2antt1 do begin OutputDebugString( 'NewValue:' ); OutputDebugString( e.newValue ); OutputDebugString( 'EditingValue:' ); OutputDebugString( EditingText ); end end; with AxG2antt1 do begin BeginUpdate(); Chart.PaneWidth[True] := 0; (Columns.Add('Edit') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType; Items.AddItem('1/1/2001'); EndUpdate(); end |
1578 |
How can I add a footer row
with AxG2antt1 do begin ShowLockedItems := True; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exBottom] := 1; h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exBottom,0]; ItemBackColor[h] := $808080; ItemForeColor[h] := $ffffff; CellValue[TObject(h),TObject(0)] := 'footer c1'; CellValue[TObject(h),TObject(1)] := 'footer c2'; CellValue[TObject(AddItem('cell')),TObject(1)] := 'cell'; end; end |
1577 |
How can I add a header row
with AxG2antt1 do begin ShowLockedItems := True; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0]; ItemBackColor[h] := $808080; ItemForeColor[h] := $ffffff; CellValue[TObject(h),TObject(0)] := 'footer c1'; CellValue[TObject(h),TObject(1)] := 'footer c2'; CellValue[TObject(AddItem('cell')),TObject(1)] := 'cell'; end; end |
1576 |
How can I fix a column, while other sizable and fill the control's client
with AxG2antt1 do begin ColumnAutoResize := True; Columns.Add('Sizable'); with (Columns.Add('F') as EXG2ANTTLib.Column) do begin AllowSizing := False; Width := 16; end; end |
1575 |
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar
|
1574 |
I'm using different bar types, in order to use different colours. The problem I'm having is that when two bars of different types overlap, and should in the histogram show as overallocated, they instead overlap here too, and show as single unit. Is there a way I can correctly show this as an overallocation
with AxG2antt1 do begin with Chart do begin FirstVisibleDate := '1/1/2001'; HistogramVisible := True; HistogramHeight := 32; Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal; PaneWidth[False] := 128; end; Columns.Add('Column'); with Items do begin AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil); h := AddItem('Item 2'); AddBar(h,'Task','1/3/2001','1/7/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); AddBar(AddItem('Item 3'),'Task','1/6/2001','1/9/2001',Nil,Nil); end; end |
1573 |
Is it possible to assign a different EBN to a specified bar
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'c:\exontrol\images\normal.ebn'); Add(2,'c:\exontrol\images\pushed.ebn'); end; with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 128; end; Columns.Add('Tasks'); with Items do begin h := AddItem('Task 1'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); h := AddItem('Task 2'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); h := AddItem('Task 3'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16777216); h := AddItem('Task 4'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16777471); h := AddItem('Task 5'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(33619967); end; EndUpdate(); end |
1572 |
How can I provide a mask for a date column
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent); begin with AxG2antt1 do begin OutputDebugString( 'Prev Value ' ); OutputDebugString( Items.CellValue[TObject(e.item),TObject(e.colIndex)] ); OutputDebugString( 'Check and Update the NewValue' ); OutputDebugString( e.newValue ); e.newValue := '1/1/2001'; end end; with AxG2antt1 do begin BeginUpdate(); MarkSearchColumn := False; with (Columns.Add('Date') as EXG2ANTTLib.Column) do begin FormatColumn := 'day(value) + `/` + month(value) + `/` + year(value)'; with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.DateType; Mask := '{1,12}\/{1,31}\/{1,2099}'; end; end; Items.AddItem('1/1/2001'); EndUpdate(); end |
1571 |
I am trying to introduce a custom tool tip to those particular cells. I have it working and I know I can style the font etc. however, what I would like to do is style the tooltip container itself like add some padding or add a border color. Is this possible
|
1570 |
Is it possible to edit a float number without using of e/E/d/D (exponent) and +/- (signs) characters
with AxG2antt1 do begin with (Columns.Add('Edit') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.EditType; Numeric := Integer(EXG2ANTTLib.NumericEnum.exDisableSigns) Or Integer(EXG2ANTTLib.NumericEnum.exFloatInteger); end; Items.AddItem(TObject(1.22)); end |
1569 |
How can I edit a float number with no using of e/E/d/D and + character
with AxG2antt1 do begin with (Columns.Add('Edit') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.EditType; Numeric := Integer(EXG2ANTTLib.NumericEnum.exDisablePlus) Or Integer(EXG2ANTTLib.NumericEnum.exFloatInteger); end; Items.AddItem(TObject(1.22)); end |
1568 |
Is it possible to edit a float number with no using of e/E/d/D (exponent) characters
with AxG2antt1 do begin with (Columns.Add('Edit') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.EditType; Numeric := EXG2ANTTLib.NumericEnum.exFloatInteger; end; Items.AddItem(TObject(1.22)); end |
1567 |
How can I edit an integer with no using of +/- signs
with AxG2antt1 do begin with (Columns.Add('Edit') as EXG2ANTTLib.Column).Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.EditType; Numeric := EXG2ANTTLib.NumericEnum($fc Or Integer(EXG2ANTTLib.NumericEnum.exDisableSigns) Or Integer(EXG2ANTTLib.NumericEnum.exFloatInteger) Or Integer(EXG2ANTTLib.NumericEnum.exFloat)); end; Items.AddItem(TObject(1)); end |
1566 |
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares
with AxG2antt1 do begin with Columns do begin Add('Value'); with (Add('CellSingleLine = False') as EXG2ANTTLib.Column) do begin ComputedField := '%0'; Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False); end; with (Add('FormatColumn/replace CRLF') as EXG2ANTTLib.Column) do begin ComputedField := '%0'; FormatColumn := 'value replace `\r\n` with ``'; end; with (Add('FormatColumn/replace TAB,CRLF') as EXG2ANTTLib.Column) do begin ComputedField := '%0'; FormatColumn := '(value replace `\t` with ``) replace `\r\n` with ``'; end; end; with Items do begin AddItem('a\ta\r\nb\tb'); end; end |
1565 |
I am using the Chart.ShowLinksColor property, the question is it is possible to prevent changing the bar's color
with AxG2antt1 do begin BeginUpdate(); DefaultItemHeight := 24; Columns.Add('Task'); with Chart do begin LevelCount := 2; FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 48; NonworkingDays := 0; LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid; ShowLinksColor[Integer(EXG2ANTTLib.ShowLinksEnum.exUpdateColorLinksOnly) Or Integer(EXG2ANTTLib.ShowLinksEnum.exShowLinksStartFrom)] := $ff; ShowLinksColor[Integer(EXG2ANTTLib.ShowLinksEnum.exUpdateColorLinksOnly) Or Integer(EXG2ANTTLib.ShowLinksEnum.exShowLinksEndTo)] := $ff00; end; with Items do begin h1 := AddItem('Task 1'); AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil); h2 := AddItem('Task 2'); AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil); ItemBar[h2,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True); AddLink('L1',h1,'',h2,''); h3 := AddItem('Task 3'); AddBar(h3,'Task','1/2/2001','1/4/2001','',Nil); AddLink('L2',h2,'',h3,''); SchedulePDM(0,''); end; EndUpdate(); end |
1564 |
Apparently, the links are shown on the back. Is there any option to bring them in front
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Tasks'); with Chart do begin FirstVisibleDate := '9/19/2006'; PaneWidth[False] := 64; NonworkingDaysPattern := EXG2ANTTLib.PatternEnum.exPatternSolid; ShowLinks := Integer(EXG2ANTTLib.ShowExtendedLinksEnum.exShowLinksFront) Or Integer(EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks); end; with Items do begin h1 := AddItem('Task 1'); AddBar(h1,'Task','9/20/2006','9/22/2006',Nil,Nil); h2 := AddItem('Task 2'); AddBar(h2,'Task','9/26/2006','9/28/2006',Nil,Nil); ItemBar[h2,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True); AddLink('L1',h1,'',h2,''); Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'L1'; end; EndUpdate(); end |
1563 |
How can I enable the extended links feature
with AxG2antt1 do begin BeginUpdate(); DefaultItemHeight := 24; Columns.Add('Task'); with Chart do begin LevelCount := 2; FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 48; NonworkingDays := 0; LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid; ShowLinks := EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks; end; with Items do begin h1 := AddItem('Task 1'); AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil); h2 := AddItem('Task 2'); AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil); AddLink('L1',h1,'',h2,''); h3 := AddItem('Task 3'); AddBar(h3,'Task','1/2/2001','1/4/2001','',Nil); AddLink('L2',h3,'',h2,''); SchedulePDM(0,''); end; EndUpdate(); end |
1562 |
How do I count all bars in the chart
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; end; with Items do begin hSummary := AddItem('Task'); AddBar(hSummary,'Task','1/2/2001','1/5/2001','K1',Nil); hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil); AddBar(InsertItem(hTask,Nil,'Task A.1'),'Task','1/3/2001','1/5/2001','K11',Nil); AddBar(InsertItem(hTask,Nil,'Task A.2'),'Task','1/3/2001','1/5/2001','K12',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K2',Nil); hTask := InsertItem(hTask,Nil,'Task B.1'); AddBar(hTask,'Task','1/5/2001','1/9/2001','K21',Nil); ExpandItem[0] := True; OutputDebugString( 'Count: ' ); OutputDebugString( ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount] ); end; EndUpdate(); end |
1561 |
Is there any property to count the all child bars of a specified item ( all descendents )
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; Bars.Copy('Task','CountTask').Color := $ff00; end; with Items do begin hSummary := AddItem('Project'); ItemBold[hSummary] := True; hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'CountTask','1/2/2001','1/5/2001','K1',Nil); AddBar(InsertItem(hTask,Nil,'Task A.1'),'CountTask','1/3/2001','1/5/2001','K11',Nil); AddBar(InsertItem(hTask,Nil,'Task A.2'),'CountTask','1/3/2001','1/5/2001','K12',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'CountTask','1/2/2001','1/5/2001','K2',Nil); hTask := InsertItem(hTask,Nil,'Task B.1'); AddBar(hTask,'CountTask','1/5/2001','1/9/2001','K21',Nil); ExpandItem[0] := True; DefaultItem := ItemByIndex[0]; OutputDebugString( 'Count: ' ); OutputDebugString( ItemBar[-3,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount] ); DefaultItem := 0; end; EndUpdate(); end |
1560 |
Is there any property to count the child bars of a specified item ( leaf descendents )
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; Bars.Copy('Task','CountTask').Color := $ff00; end; with Items do begin hSummary := AddItem('Project'); ItemBold[hSummary] := True; hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil); AddBar(InsertItem(hTask,Nil,'Task A.1'),'CountTask','1/3/2001','1/5/2001','K11',Nil); AddBar(InsertItem(hTask,Nil,'Task A.2'),'CountTask','1/3/2001','1/5/2001','K12',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K2',Nil); hTask := InsertItem(hTask,Nil,'Task B.1'); AddBar(hTask,'CountTask','1/5/2001','1/9/2001','K21',Nil); ExpandItem[0] := True; DefaultItem := ItemByIndex[0]; OutputDebugString( 'Count: ' ); OutputDebugString( ItemBar[-2,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount] ); DefaultItem := 0; end; EndUpdate(); end |
1559 |
Is there any property to count the child bars of a specified item ( direct descendents )
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; Bars.Copy('Task','CountTask').Color := $ff00; end; with Items do begin hSummary := AddItem('Project'); ItemBold[hSummary] := True; hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'CountTask','1/2/2001','1/5/2001','K1',Nil); AddBar(InsertItem(hTask,Nil,'Task A.1'),'Task','1/3/2001','1/5/2001','K11',Nil); AddBar(InsertItem(hTask,Nil,'Task A.2'),'Task','1/3/2001','1/5/2001','K12',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'CountTask','1/2/2001','1/5/2001','K2',Nil); hTask := InsertItem(hTask,Nil,'Task B.1'); AddBar(hTask,'Task','1/5/2001','1/9/2001','K21',Nil); ExpandItem[0] := True; DefaultItem := ItemByIndex[0]; OutputDebugString( 'Count: ' ); OutputDebugString( ItemBar[-1,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount] ); DefaultItem := 0; end; EndUpdate(); end |
1558 |
How can I define all child items to belong to a summary bar (DefineSummaryBars-3)
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; end; with Items do begin hSummary := AddItem('Summary'); AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil); hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil); hTask := InsertItem(hTask,Nil,'Task A.1'); AddBar(hTask,'Task','1/3/2001','1/5/2001','K11',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K2',Nil); hTask := InsertItem(hTask,Nil,'Task B.1'); AddBar(hTask,'Task','1/5/2001','1/9/2001','K21',Nil); DefineSummaryBars(hSummary,'',-3,'<K*>'); ExpandItem[0] := True; end; EndUpdate(); end |
1557 |
Can I define automatically the leaf descendents of the summary bar (DefineSummaryBars-2)
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; end; with Items do begin hSummary := AddItem('Summary'); AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil); hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'1Task','1/2/2001','1/5/2001','K1',Nil); hTask := InsertItem(hTask,Nil,'Task A.1'); AddBar(hTask,'Task','1/3/2001','1/5/2001','K11',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'1Task','1/2/2001','1/5/2001','K2',Nil); hTask := InsertItem(hTask,Nil,'Task B.1'); AddBar(hTask,'Task','1/5/2001','1/9/2001','K21',Nil); DefineSummaryBars(hSummary,'',-2,'<K*>'); ExpandItem[0] := True; end; EndUpdate(); end |
1556 |
How can I assign the childs bars to a summary bar (DefineSummaryBars-1)
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; end; with Items do begin hSummary := AddItem('Summary'); AddBar(hSummary,'Summary','1/2/2001','1/2/2001','',Nil); hTask := InsertItem(hSummary,Nil,'Task A'); AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil); hTask := InsertItem(hSummary,Nil,'Task B'); AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil); ExpandItem[hSummary] := True; DefineSummaryBars(hSummary,'',-1,'<*>'); end; EndUpdate(); end |
1555 |
Is it possible to define a summary bar to include all bars in the chart (DefineSummaryBars-0)
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; end; with Items do begin hSummary := AddItem('Summary'); AddBar(hSummary,'Summary','1/2/2001','1/2/2001','summary',Nil); AddBar(AddItem('Task A'),'Task','1/2/2001','1/5/2001','K1',Nil); AddBar(AddItem('Task B'),'Task','1/6/2001','1/9/2001','K2',Nil); AddBar(AddItem('Task C'),'Task','1/11/2001','1/14/2001','K3',Nil); DefineSummaryBars(hSummary,'summary',0,'<K*>'); end; EndUpdate(); end |
1554 |
Is there any way to "unselect" radio group
// DblClick event - Occurs when the user dblclk the left mouse button over an object. procedure TWinForm1.AxG2antt1_DblClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_DblClickEvent); begin with AxG2antt1 do begin with Items do begin h := CellChecked[1234]; CellHasCheckBox[TObject(0),TObject(h)] := True; CellState[TObject(0),TObject(h)] := 0; CellHasCheckBox[TObject(0),TObject(h)] := False; end; end end; // SelectionChanged event - Fired after a new item has been selected. procedure TWinForm1.AxG2antt1_SelectionChanged(sender: System.Object; e: System.EventArgs); begin with AxG2antt1 do begin with Items do begin CellState[TObject(FocusItem),TObject(0)] := 1; end; end end; with AxG2antt1 do begin MarkSearchColumn := False; SelBackColor := Color.FromArgb(255,255,128); SelForeColor := Color.FromArgb(0,0,0); Columns.Add('Default'); with Items do begin h := AddItem('Radio 1'); CellHasRadioButton[TObject(h),TObject(0)] := True; CellRadioGroup[TObject(h),TObject(0)] := 1234; h := AddItem('Radio 2'); CellHasRadioButton[TObject(h),TObject(0)] := True; CellRadioGroup[TObject(h),TObject(0)] := 1234; CellState[TObject(h),TObject(0)] := 1; h := AddItem('Radio 3'); CellHasRadioButton[TObject(h),TObject(0)] := True; CellRadioGroup[TObject(h),TObject(0)] := 1234; end; end |
1553 |
The Column.Alignment property does not seem to work for cells with images in them. What can be done
with AxG2antt1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); TreeColumnIndex := -1; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; HeaderHeight := 24; DefaultItemHeight := 24; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin AllowSizing := False; Width := 32; HTMLCaption := '<img>1</img>'; HeaderAlignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); end; Columns.Add('Rest'); with Items do begin AddItem('<img>1</img>'); AddItem('<img>2</img>'); AddItem('<img>3</img>'); end; EndUpdate(); end |
1552 |
Is there any way to determine in a bar would overlay another bar or to not allow this and get some error indication
// BarResize event - Occurs when a bar is moved or resized. procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent); begin with AxG2antt1 do begin Refresh(); end end; with AxG2antt1 do begin BeginUpdate(); DefaultItemHeight := 22; Columns.Add('InterectBars'); with Chart do begin PaneWidth[False] := 48; FirstVisibleDate := '1/1/2001'; with Bars.Item['Task'] do begin OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect; Overlaid[EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect] := 'ERROR'; end; with Bars.Add('ERROR') do begin Color := $ff; Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid; Height := 7; end; end; with Items do begin h := AddItem(''); AddBar(h,'Task','1/2/2001','1/4/2001','A','A'); AddBar(h,'Task','1/3/2001','1/5/2001','B','B'); CellValue[TObject(h),TObject(0)] := TObject(IntersectBars[h,'A',h,'B']); h := AddItem(''); AddBar(h,'Task','1/6/2001','1/9/2001','A','A'); AddBar(h,'Task','1/10/2001','1/13/2001','B','B'); CellValue[TObject(h),TObject(0)] := TObject(IntersectBars[h,'A',h,'B']); h := AddItem(''); AddBar(h,'Task','1/6/2001','1/9/2001','B','B'); AddBar(h,'Task','1/10/2001','1/13/2001','A','A'); CellValue[TObject(h),TObject(0)] := TObject(IntersectBars[h,'A',h,'B']); end; EndUpdate(); end |
1551 |
Is it possible to change the font size of the header compared to that of the control. I would like to make the font of the headers smaller
with AxG2antt1 do begin BeginUpdate(); HeaderHeight := 32; with Columns do begin with (Add('ID') as EXG2ANTTLib.Column) do begin HTMLCaption := '<font ;16>ID'; Width := 32; AllowSizing := False; end; (Add('Task') as EXG2ANTTLib.Column).HTMLCaption := '<font ;16>Task'; end; FocusColumnIndex := 1; ShowFocusRect := False; Chart.PaneWidth[True] := 0; with Items do begin CellValue[TObject(AddItem(TObject(1))),TObject(1)] := 'Task A'; CellValue[TObject(AddItem(TObject(2))),TObject(1)] := 'Task B'; end; EndUpdate(); end |
1550 |
How can I create items and bars at runtime
with AxG2antt1 do begin BeginUpdate(); with Columns do begin with (Add('ID') as EXG2ANTTLib.Column) do begin FormatColumn := '1 index '''''; Width := 32; AllowSizing := False; end; (Add('Task') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; end; FocusColumnIndex := 1; ShowFocusRect := False; with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; end; AxG2antt1.Template := 'Chart.Bars("Task"){Def(3) = "<%=%C1%>";Def(4)=18}'; EndUpdate(); end |
1549 |
How can I a group summary bar with a task bar, so when the summary bar changes the task bar will move accordingly
with AxG2antt1 do begin Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; end; with Items do begin hSummary := AddItem('Summary'); AddBar(hSummary,'Summary','1/2/2001','1/2/2001',Nil,Nil); hTask := AddItem('Task A'); AddBar(hTask,'Task','1/2/2001','1/5/2001',Nil,Nil); DefineSummaryBars(hSummary,'',hTask,''); hTask := AddItem('Task B'); AddBar(hTask,'Task','1/4/2001','1/8/2001',Nil,Nil); DefineSummaryBars(hSummary,'',hTask,''); end; end |
1548 |
How can I show the bars using a solid color, with no pattern inside
with AxG2antt1 do begin BeginUpdate(); DefaultItemHeight := 24; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; with Chart do begin DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; NonworkingDays := 0; PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; Bars.Item['Task'].Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid; end; Columns.Add('Column'); with Items do begin h := AddItem('Solid A'); AddBar(h,'Task','1/2/2001','1/4/2001','A',Nil); AddBar(h,'Task','1/5/2001','1/7/2001','B',Nil); ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); AddBar(h,'Task','1/8/2001','1/10/2001','C',Nil); ItemBar[h,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280); h := AddItem('Solid B'); AddBar(h,'Task','1/2/2001','1/4/2001','A',Nil); ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(255); AddBar(h,'Task','1/5/2001','1/7/2001','B',Nil); ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(65280); AddBar(h,'Task','1/8/2001','1/10/2001','C',Nil); ItemBar[h,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16711680); ItemBar[h,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(16711935); end; EndUpdate(); end |
1547 |
Basically what I am trying to do is replicate MS Project look & feel. Is that possible
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAEGg4BNUMQAAYAQGKIYBkAKBQAGaAoDDMOQ4QwAAxDCKsEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAYQEiKLoaRzAcwyDAcQRFCKUJxhEYZai' + '+NobSBQMZqBQgASIUCLZ5ACSYEigAovTULCKwJiWNZDUTRcTxCKQahLLivIhGUYKfgmY5lT5VUT1HS9IShJSmKTlORLOi+M4zUJLc4SVblGz7FyfYDBKygLqqFigLAxd' + 'DYTRNfzjHiTKbtGA7MADA4DVTAeC2bC+EYVTytY4sHQrIACZ5iWREMhXTi0E4rTa6dTxaS6KzKGqsZbsNAbHLdHTfVy1Mx1XaobqDJZdaTpdjaTDeJSjVjKdx4TZqSiz' + 'jSGJOgcU4RhcIQDDURhIESXwEGgbQJBQQjeggQBiC4NJAluGJrAUB5Lmmc56n4Pp/i+NQjmqdQ5k2J5+AGAAgCgFgEgAHxQAGfoBmAOA2AaAxghgLgOgMIJ4AoER8mEW' + 'BSBoNohHKAgZgSYgIHYH4ImCB5OAqBghjiEgcgmIQoioD4IiKGJGCsUgUHiVirmOBQVAEgI='); Add(39,'CP:1 -1 -1 0 0'); Add(40,'gBFLBCJwBAEHhEJAEGg4BEcMQAAYAQGKIYBkAKBQAGaAoDDMOQ4QwAAxDCKsEwsACEIrjKCRShyCYZRhGcTAFD8EhhECTZKkAZwEiKLoaRzAcwyDAcQRFCKUJxlKa5Pj' + 'aLwAAbJMZKAqDDgBIijIqnKA5JoyKIkTzCIJxXScByDGqNaQoehYXhEMg1CTXVgRCKoYTDBKybLqGT6VoCP5vWJaURWHZFTTJOyNagmSJ6XACbQMW7gNYQGBEEigNIxT' + 'oOU4jFDGIB2VAQRK5BDQbQSFCpIRCCRQYhcQJ6YIAD76HomS5NU7UNKhHSdMy3J6ra5sOqbBqWa5LWjbNq3DadSzvPKub5vexwHwWawSUDkOR5Li+M43S4JPS5bZdDxP' + 'iWVJrnWOw9F6XxTiGWpsHcO5+C6Xx7kOZpwHoOxeF8T4fkeYJgnEdZwOwQRBnSex9H6f4vk+c5xn4fZQhQBCAg=='); Add(41,'gBFLBCJwBAEHhEJAEGg4BQICg6AADACAxRDAMkOQAGaAoDDUMQyQwAAxDSK8EwsACEIrjKCRShyCYZRhGcTALBMIwKGABIRGUZJGDkOYgDCBEhTHDUOwHGyQYDkCQoRi' + 'YMAwTBQMaTXDdCQ1ECkJomObqAgkMZCTbKMySAA0NgPD6sKSjOIRSDUJZcV5EoAKfiqZIRSJSMZVLLVNSVJipAAlOTZPo6JJuTLOE4WVRcSydH6oAApeg6KoYAFzQAED' + 'CbYgOTKBYLUOCwTZmDwTK6BcTtXDbejeYYcZ7DNj2NYtJ4TRCBcpzLLIXrCKg0TBPQ4YNC2DT5VDWIq1aDdQo7MpxWjlGI5Ri2c51UDSYi0G4tDyLSYWXDfFSQTrHDQX' + 'hAAghCUAxJgyaB1DkGRyDCKBhAiGwLg0DYhCKDI8CcVwIAwRotBeAYCCmBZ0nsfR+n+L5PlYE53BwTpzn4AIAiAGAOAMfZfmeVBwDuD54C4DYDCCaA6AgQJfHGPJtD+Y' + 'RoGIF4GGGrAAH2RpjjCf4IGIOIKCSCQhmeXBtDqT54i4LYLCKaI6CkfRGlOKgtg2IxYl4OoMkwIYwmkP5jmkAg/hAZAYnAaw6A+eQeEmEgkikKg8BqDkYFCFIlBkThTg' + '8BoThif4WGWORqFyFwjkGIJlD+ZgphIY4ZGYWYEmSGQmjGIhthvMpwGcOJPnmTh1h0JxploPAZg4I5+HyH4nlmfh/g8BhTgSf4hGgegagiIlShCYA/miahCg+JBpUIYw' + '3k+ehehmJgpioaoWDeKYagAY4oioSZFn2BQfFGCJdD+aoqjKK4rGqWJwGENwPnqTo1i1gtiBgDYzn6PIviuWp+j+DwFnMaJ/jEbB7BqSIyCOQR4lkP5smsQpPjQbQbDS' + 'WI0C0cR6lmNpqGMCgJDCBZTFyf44G4O4KmSOWTnCVg/m6K4ymuOxu4OWw1E+e5OnWPQvGvYgWg0Q5+nyP4vlvE+OBMTJ/kEcB8BsCJCDATArA6QhxAgeIgkScRMFcFpF' + 'lCFAEICA'); Add(42,'gBFLBCJwBAEHhEJAEGg4BY8MQAAYAQGKIYBkAKBQAGaAoDDMOQ4QwAAwjQLMEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAYgEiKLoaRzAcwyDAcQRFCKUJxhEY5ai' + '+NobRCAUiwHQUBr/I4AKLfeJ5dACKYNShRMrSABMNgZBKpJAqKiqJoiFoRDINIi2BYUIhqGCxYRseyZegmEYWVTREr3HKsVTtAanjZSJakXxnGaQJ7jKaLXo6II8YTIW' + 'BABaIAQiBahQArOiKchaTZ5YheFRYVBOG4bK6BcguW4qGxSXpuRxZOo2YAFVzNNC3YzkCIcegnIp9ZxeFK5Tg1Z4XKTaNwqPBcYpHPqdVhCOgYZwUb5XMjWNatLYIboz' + 'iiUhzCAeJeG6ZAAAiBIUA0JgziGVJkGUGJIBgUYSBEN5VBoGxCEUHItjSFAxBcRhim4dIqFGTB+BUfxfneegAgCYAoBQFR+lQeASAEBRIGESAogMYJ4DoEIEmCaAqAoJ' + 'oGGCbgYgaIYYG4HoHGICByCKAoKmGZBOgkYh4hoKIKmKKI2CmC5giMBINBgY0AjODRjgiXg6g2I8glUKAHEifhBhAJApBYRIRmQOQmAoOgLBIEhMhOJJZD4UoUGUSRCF' + 'aAoOHKPIAhYZY5GoXIXmWaYGF2GJlgKMB9DmZhpiIZ4aGaSYuG6GomigWgGDmCohmYdIdicWZeHqHRnCgHgIh8aAIBoCA/lAECAg'); end; Appearance := EXG2ANTTLib.AppearanceEnum($28000000); BackColor := Color.FromArgb(255,255,255); BackColorLevelHeader := Color.FromArgb(255,255,255); (GetOcx() as EXG2ANTTLib.G2antt).BackColorHeader := $27000000; SelBackColor := Color.FromArgb(0,0,0); SelForeColor := Color.FromArgb(255,255,255); with Chart do begin BackColorLevelHeader := $27000000; BackColor := $ffffff; Bars.Item['Task'].Color := $2a000000; end; (GetOcx() as EXG2ANTTLib.G2antt).FilterBarBackColor := $1000000; set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$29000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exToolTipAppearance,$1000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$1000000); EndUpdate(); end |
1546 |
Is there anyway to change the style of the splitter which separates the list/chart
with AxG2antt1 do begin VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$1ff0000); end |
1545 |
Does your control support subscript or superscript, in HTML captions
with AxG2antt1 do begin with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 64; end; Columns.Add('Column'); with Items do begin h := AddItem('Item 1'); AddBar(h,'Task','1/2/2001','1/4/2001','',Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<sha ;;0>Event <b><font ;6><off -6>2<off 4>3<off 4>1'; ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end |
1544 |
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance
|
1543 |
Is it possible to change the visual appearance of the columns selector/floating bar(3)
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; end; VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn'); VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn'); set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatAppearance,$2000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,$3000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatCaptionBackColor,$f0f5f6); ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1542 |
Is it possible to change the visual appearance of the columns selector/floating bar(2)
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; end; VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn'); set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,$3000000); ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1541 |
Is it possible to change the visual appearance of the columns selector/floating bar(1)
|
1540 |
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; end; ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1539 |
Is it possible to list a column to columns selector/floating bar, but still user can use it
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; with (Add('Column 3') as EXG2ANTTLib.Column) do begin Visible := False; Enabled := False; end; end; ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1538 |
How can I prevent a specific column not to be listed in the columns selector/floating bar
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; with (Add('Column 3') as EXG2ANTTLib.Column) do begin Visible := False; AllowDragging := False; end; end; ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1537 |
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; end; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Hidden Columns'); ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1536 |
How can I show the columns selector, so the user can drag and drop columns to the view
with AxG2antt1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXG2ANTTLib.Column).Visible := False; end; ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
1535 |
The column's header is changed while the cursor hovers it. Is it possible to prevent that
|
1534 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Column'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; Layout := 'Select="0";SingleSort="C0:2";Columns=1'; EndUpdate(); end |
1533 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Column'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; Layout := 'gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQ' + 'Aqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0j' + 'E3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI='; EndUpdate(); end |
1532 |
How do I arrange my columns on multiple levels
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; with Columns do begin with (Add('C0') as EXG2ANTTLib.Column) do begin ExpandColumns := '1,2'; DisplayExpandButton := False; end; Add('C1'); Add('C2'); Add('C3'); with (Add('C4') as EXG2ANTTLib.Column) do begin ExpandColumns := '5,6'; DisplayExpandButton := False; end; Add('C5'); with (Add('C6') as EXG2ANTTLib.Column) do begin ExpandColumns := '6,7'; DisplayExpandButton := False; end; Add('C7'); end; EndUpdate(); end |
1531 |
Does your control support expandable header or columns, so I can arrange it on multiple levels
with AxG2antt1 do begin BeginUpdate(); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; BackColorLevelHeader := Color.FromArgb(240,240,240); with Columns do begin with (Add('Photo') as EXG2ANTTLib.Column) do begin AllowSizing := False; Width := 32; end; Add('Personal Info'); Add('Title'); Add('Name'); Add('First'); Add('Last'); Add('Address'); Item['Personal Info'].ExpandColumns := '2,3'; with Item['Name'] do begin ExpandColumns := '4,5'; Expanded := False; end; end; EndUpdate(); end |
1530 |
I need a Day/Hour Display where the Bars should be created/resized in a 15 Minute Scale in a normal View, but in a 5 Minute Scale when on an InsideZoom. How can I do that
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; UnitWidth := 50; FirstVisibleDate := '1/1/2013'; LevelCount := 2; Level[0].Label := TObject(4096); Level[1].Label := '<%h%>:<%nn%>'; Level[1].Unit := EXG2ANTTLib.UnitEnum.exMinute; Level[1].Count := 60; ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute; ResizeUnitCount := 15; AllowInsideZoom := True; with DefaultInsideZoomFormat do begin InsideCount := 5; InsideUnit := EXG2ANTTLib.UnitEnum.exMinute; InsideLabel := '<%nn%>'; end; end; with Items do begin AddItem('Item'); end; EndUpdate(); end |
1529 |
Can I change the format of date to be shown in the control
with AxG2antt1 do begin Chart.PaneWidth[True] := 0; with Columns do begin Add('Default'); with (Add('Format.1') as EXG2ANTTLib.Column) do begin ComputedField := '%0'; FormatColumn := 'dateF(value) replace `/` with `-`'; end; with (Add('Format.2') as EXG2ANTTLib.Column) do begin ComputedField := '%0'; Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := '`<b>`+ shortdate(value) + `</b> ` + timeF(value)'; end; with (Add('Format.3') as EXG2ANTTLib.Column) do begin ComputedField := '%0'; Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := '` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) ) + `</b> ` + ( dateF(valu' + 'e) replace `/` with `-` )'; end; end; with Items do begin AddItem('1/1/2001 10:00:00 AM'); AddItem('1/2/2001 10:00:00 AM'); end; end |
1528 |
How can I display a text/caption on the chart part of the control
with AxG2antt1 do begin BeginUpdate(); AntiAliasing := True; with Chart do begin FirstVisibleDate := '12/26/2000'; PaneWidth[False] := 128; end; Columns.Add('Column'); with Items do begin h1 := AddItem('Item 1'); AddBar(h1,'Task','1/2/2001','1/4/2001','A',Nil); ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'text'; h1 := AddItem('Item 2'); AddBar(h1,'Task','1/2/2001','1/4/2001','A',Nil); ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'text outside associated with a bar'; ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); h1 := AddItem('Item 3'); AddBar(h1,'','1/2/2001','1/2/2001','A',Nil); ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'text with no bar associated'; h1 := AddItem('Item 4'); AddBar(h1,'Task','1/2/2001','1/5/2001','A',Nil); h1 := AddItem('Item 5'); h1 := AddItem('Item 6'); h1 := AddItem('Item 7'); h1 := AddItem('Item 8'); AddBar(h1,'Task','1/2/2001','1/4/2001','A',Nil); h1 := AddItem('Item 8'); AddBar(h1,'Task','1/2/2001','1/6/2001','A',Nil); end; with Chart.Notes do begin Add('1S',TObject(AxG2antt1.Items.ItemByIndex[3]),'A','<font ;6>Movable Note Inside the Bar').PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteStart] := True; Add('AK',TObject(AxG2antt1.Items.ItemByIndex[6]),'1/6/2001','Note associated with a date: <%mm%>/<%dd%>/<%yyyy%>'); with Add('2S',TObject(AxG2antt1.Items.ItemByIndex[7]),'A','<font ;6>Fixed Note Left') do begin ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden; PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 0; PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -32; PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False; PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteEnd] := $ffff; end; with Add('3S',TObject(AxG2antt1.Items.ItemByIndex[8]),'A','Start<br><%mmm%> <%d%> <%yyyy%>') do begin PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True; PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -64; LinkStyle := EXG2ANTTLib.LinkStyleEnum.exLinkDot; LinkWidth := 2; LinkColor := $ff0000; end; with Add('3F',TObject(AxG2antt1.Items.ItemByIndex[8]),'A','End<br><%mmm%> <%d%> <%yyyy%>') do begin RelativePosition := TObject(1); PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True; LinkStyle := EXG2ANTTLib.LinkStyleEnum.exLinkDot; LinkWidth := 2; LinkColor := $ff0000; end; end; EndUpdate(); end |
1527 |
Which is the best way of change Bar parent
with AxG2antt1 do begin Debug := True; Chart.FirstVisibleDate := '1/1/2001'; Columns.Add('Column'); with Items do begin h1 := AddItem('Item 1'); AddBar(h1,'Task','1/2/2001','1/4/2001','A',Nil); h2 := AddItem('Item 2'); AddBar(h2,'Task','1/3/2001','1/5/2001','B',Nil); h3 := AddItem('Item 3'); AddBar(h3,'Task','1/5/2001','1/7/2001','A',Nil); ItemBar[h3,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarParent] := TObject(h1); OutputDebugString( 'The Bar A of H3 fails to change the parent to H1 as it has already a bar named A' ); ItemBar[h3,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarParent] := TObject(h2); OutputDebugString( 'The Bar A of H3 can be moved to H2, as it contains no bars with the key A' ); end; end |
1526 |
Is it possible to have a bar in bar
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAEGg4BS4Dg6AADACAxRDAMgBQKAAzQFAYbBmGaGAAGIZhQgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDKAkRRdDSOYDmGQYDiCIoRShOMIjRL' + 'UXxtDYEIRkSZYJAKCTtBwJAAURRULR6ACUYDnSRqGj6CQKRqEVBSLAdKyXJKvaZhGIRSDUJZkWZEIyjBY8EzXNqrIDoGKqYgOQ4XV5TFgxPR9IyhEAaLrleT5TjOII/R' + 'pOEpYXSVHxFRAAAYhG4wABCXAAXjYF5Udhlfx3FCvMbqeCcSgOWoDZZRFa0PjVQQtNC4IitGzrMqrNaDSBlGigBauKw3TKlMzye7repOA5+aJGVz7VgfGz7EDjKg0GJc' + 'gMex3lOZB5jgPYHHMaYxjeRBilWbZNG4B49l2do6hkfIhECUhjDoHROEYUYMgEbQMCEEx+lGIY0CQUQJHYGoUgQGBFkgB4FmkOINiMbBrAwQoxngSQMCCYJAG8DYCkMZ' + 'JNDOAhAHCbYGGGOBqByB5hiMcJSDORhwjQKoEkKSIgHoEZEDgWJOECSwyGSGwjkWUJUh8HADiiXA6CSRgQliFwcgcSICB2EJkCKDIAB4CAxDgMoOiOIkfA4CoiDCDhAm' + 'UEg4hEF4DHKCByA8JYpHIWwbAMIIuC6EIkCiOBwA2QpSHQbgOkoIZMD2GxmnmOhVhUJQiEwYAOAoQZQD6HhnjmaIfBuQ5BlQPQLiMEhuEKIRHmEKA7h+Q5ChQdQPmiah' + 'Cg+JBnDAAhVCVPpoicHYEAobodicKZqHqGAO0YNA0ikQxKg6IYnAqAZcEGKxqnqOowiUZRSFwYwPAqIZkEOLhrjqaIqB4BAqn6QYwCwKwWkSMZECKLo6jKBA7DKTItWE' + 'ZBlA8SpRmwRY1G0exYi0HoEEsbpdjcLZrgaYI4kQQo6laOYEFuIpojQCJiHAZgPksAZ0EePBvDuSp0j2bxrmadY+m8QpGnKP4EHwAwAjsCZxiQQQtAgAQrAiQowhKUB/' + 'BIcJsEMD5EHETBPBYEhLFwJwZBKMY8G6bAoEaIQMjcIIEkzUZJAscgEEuShyjyKwskucpskQSwuDITJQEyTYzGuMIjBsBBCmiBATjObQDD+UB0E0DxGlCNINASO5PnSM' + 'Q7E2Uxu3CbQRguUgYFCVR1H0WxYC2R5xDSDgVWiXA8AyNggksXwPDWQQ3FgL4IHERxsluNpdj6bAqAacQckAEQBQWxfDzF4BUYYqBKhEEQNMDgPQGhFGIDgVwKR3iiCi' + 'IIIgig+BfA2MYOLtAqA4ESCYDIFgVDyGEKkPAQgFBDDwG4DYnQzg5GiDIOAZw3hCDoA8MQIA9PeGEHkRIyx6jiOMEoTAxRMhoCeIwUQKSbCKH6NgV43AECyFeEkEQdBT' + 'AxC0FESQYhgB+DGPcTwYBXBZEeCIOoKg5j6EIJAbQNxJCjCAMAJwDRxghA4DEBYpk1hnHwH4DIxg3AaFGGgMQFwHhBHgGkewhhCDIHMDkDY0AlAGEAIAgIA='); Add(2,'c:\exontrol\images\normal.ebn'); Add(3,'CP:2 2 -4 2 4'); end; with Chart do begin PaneWidth[False] := 256; LevelCount := 2; FirstVisibleDate := '1/1/2001'; end; Columns.Add('Info'); with Items do begin h := AddItem('Range Moveable Frame'); AddBar(h,'Task','1/4/2001','1/8/2001','F',Nil); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'This bar can be moved inside the displayed range.'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '1/2/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd] := '1/18/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange] := TObject(32); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRangeTransparent] := TObject(90); h := AddItem('Range Moveable Pattern'); AddBar(h,'Task','1/6/2001','1/10/2001','F',Nil); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'This bar can be moved inside the displayed range.'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '1/2/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd] := '1/18/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange] := TObject(1); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRangeTransparent] := TObject(90); h := AddItem('Range Moveable EBN Transparent'); AddBar(h,'Task','1/8/2001','1/12/2001','F',Nil); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'This bar can be moved inside the displayed range.'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '1/2/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd] := '1/18/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange] := TObject(16777216); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRangeTransparent] := TObject(50); h := AddItem('Range Moveable EBN Opaque 1'); ItemHeight[h] := 24; AddBar(h,'Task','1/10/2001','1/14/2001','F',Nil); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'This bar can be moved inside the displayed range.'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '1/2/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd] := '1/18/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange] := TObject(33554432); h := AddItem('Range Moveable EBN Opaque 2'); ItemHeight[h] := 24; AddBar(h,'Task','1/12/2001','1/16/2001','F',Nil); ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'This bar can be moved inside the displayed range.'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '1/2/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd] := '1/18/2001'; ItemBar[h,'F',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange] := TObject(50331648); end; EndUpdate(); end |
1525 |
How can I show vertical lines using the SelectDate
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAEGg4BK8IQAAYAQGKIYBkAKBQAGaAoDDYMwzQwAAxDMKEEwsACEIrjKCRShyCYZRhGcTAFD8EhhECTY4lCQJAiKLoeQLHMBybJ8LwiGQaRJmeaYRD' + 'UMI6QjPVARVIkaxhCSSaKpIAIBEB'); end; with Chart do begin PaneWidth[False] := 0; FirstVisibleDate := '1/1/2008'; MarkTodayColor := BackColor; LevelCount := 2; AllowSelectDate := EXG2ANTTLib.SelectDateEnum.exNoSelectDate; MarkSelectDateColor := $1000000; SelectLevel := 1; SelectDate['1/15/2008'] := True; SelectDate['1/18/2008'] := True; end; EndUpdate(); end |
1524 |
How can I show vertical lines using the SelectDate
with AxG2antt1 do begin BeginUpdate(); with Chart do begin PaneWidth[False] := 0; FirstVisibleDate := '1/1/2008'; MarkTodayColor := BackColor; LevelCount := 2; AllowSelectDate := EXG2ANTTLib.SelectDateEnum.exNoSelectDate; MarkSelectDateColor := $7fff0000; SelectLevel := 1; SelectDate['1/15/2008'] := True; SelectDate['1/18/2008'] := True; end; EndUpdate(); end |
1523 |
How can I find if there is any filter applied to the control
// FilterChange event - Occurs when the filter was changed. procedure TWinForm1.AxG2antt1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxG2antt1 do begin OutputDebugString( 'If negative, the filter is present, else not' ); OutputDebugString( Items.VisibleItemCount ); end end; with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; TreeColumnIndex := -1; FilterInclude := EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly; with (Columns.Add('Column') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'C1'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
1522 |
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; TreeColumnIndex := -1; FilterInclude := EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly; with (Columns.Add('Column') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'C1|C2'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
1521 |
Is there any method to get only the matched items and not the items with his parent
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; FilterInclude := EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly; with (Columns.Add('Column') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'C1|C2'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
1520 |
Is it possible to specify a working day exception that would override the non-working day pattern
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Pattern'); with Chart do begin FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday; FirstVisibleDate := '1/24/2008'; PaneWidth[False] := 52; LevelCount := 2; end; with Items do begin AddItem('Default'); ItemNonworkingUnits[AddItem('1/26/2008'),TObject(False)] := 'weekday(value) case (default:0 ; 0:1; 6:(value != #1/26/2008#))'; ItemNonworkingUnits[AddItem('1/27/2008'),TObject(False)] := 'weekday(value) case (default:0 ; 0:(value != #1/27/2008#); 6:1)'; ItemNonworkingUnits[AddItem('Sundays'),TObject(False)] := 'weekday(value) = 0'; end; EndUpdate(); end |
1519 |
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area
with AxG2antt1 do begin BeginUpdate(); ScrollBars := EXG2ANTTLib.ScrollBarsEnum.exDisableBoth; Chart.ToolTip := ''; set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exVScroll,EXG2ANTTLib.ScrollPartEnum.exExtentThumbPart,True); set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exHScroll,EXG2ANTTLib.ScrollPartEnum.exExtentThumbPart,True); set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exHChartScroll,EXG2ANTTLib.ScrollPartEnum.exExtentThumbPart,True); ScrollWidth := 4; set_Background(EXG2ANTTLib.BackgroundPartEnum.exVSBack,$f0f0f0); set_Background(EXG2ANTTLib.BackgroundPartEnum.exVSThumb,$808080); ScrollHeight := 4; set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSBack,get_Background(EXG2ANTTLib.BackgroundPartEnum.exVSBack)); set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSThumb,get_Background(EXG2ANTTLib.BackgroundPartEnum.exVSThumb)); set_Background(EXG2ANTTLib.BackgroundPartEnum.exScrollSizeGrip,get_Background(EXG2ANTTLib.BackgroundPartEnum.exVSBack)); EndUpdate(); end |
1518 |
Is it possible to associate an extra frame, border, EBN to the bar/task
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAEGg4BNACg6AADACAxRDAMgBQKAAzQFAYbhsGCGAAGEZBQgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDEAkRRdDSOYDmGQYDiCIoRShOMaTVJ' + '8bQ2ASEaAmWK3boUAJFPrFc6ABJMZRRISXJABeKwRoGJYaUhRdDRNCIZBqEqua7iEZRQqCCZkWZPNTRVScByhF61IDpWjKLDKJJwXBMcxyBL0NRxFTAKawGoYbq0AJQV' + 'TQcZPVhgAYYfSlMDuOB5Gq+G5SQjhWIgBjde4dRrHYrsGyQAp7JJoWLZMQyFIFIYNTS8LgpPI6LyyP5rABhWw5PiUVyfWTMdwzPatbyKHJicbpepWPxcNYtNzcNb3SAb' + 'n+KgAmqP5yDiIAACIEhQDSGJOgcU4RhQYwgFUQwIESXxEGgbQJBQQhzHmUAAGILh0lWbpEGIIQQHuegaAaoRYBUBYBCgFAOAOQJgC4CgCCCQAUAQARACgRZFEa3ogCcC' + 'ICDCDZ9AeH5wGgFoHmAUBIA6CJgiALgMAIABYiYER+BuMIyC4CZjAcYgygyYxIlYNoNBGMJGDoCximiXg+g+Yx0G0DgNiOIJGECEZkgQbA7A8A5JA4SITmOZBsEGFJDk' + 'kLhQhXOItBYEZEGEHBCBARApGIYh1EAaIoAMQIEkENBNBGZpJg4YgCGcAAaGUAAFCmVhqBMZppGADQDACQAmAwAAFgoBh1BSJ4ZFwEEdHmcFmgWag2gEFhoFlINYkoHA' + 'QAABhKGQX4jGkGQ8BiJ5BDqBAABqKl1GSJxkgAcoqAYAR3lQcIrkaOoSiiEZCBCBAgiqAaJHaLpHBqQoliaBZxHwWYwkUQRMFQExEmENBJBIRIBAgQwQkOYJ0D4DhDgC' + 'YAzjWQpgjwLgKi2QIWl4CACADeofC4SpsHcHArlqRBqBkbpLAaQoxAUQRQE6PLoCaT40AOYJ6lWNdXlAL4/m2QIql4CRAAQBCAg='); Add(2,'CP:1 -4 -4 4 4'); end; Columns.Add('Task'); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 128; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; end; with Items do begin AddBar(AddItem('Task'),'Task','1/2/2001','1/5/2001','K1',Nil); h := AddItem('Task/ EBN Frame'); ItemHeight[h] := 32; AddBar(h,'Task','1/3/2001','1/15/2001','K2',Nil); ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432); h := AddItem('Task/ EBN Frame'); ItemHeight[h] := 32; AddBar(h,'Task','1/3/2001','1/15/2001','K2',Nil); ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(50331392); AddBar(AddItem('Task'),'Task','1/2/2001','1/5/2001','K3',Nil); end; EndUpdate(); end |
1517 |
Is it possible to automatically display the working days duration in a column
with AxG2antt1 do begin BeginUpdate(); with Columns do begin Add('Tasks'); with (Add('Duration') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(513); Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := 'A'; end; with (Add('Working') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258); Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := 'A'; end; end; Items.AllowCellValueToItemBar := True; with Chart do begin PaneWidth[False] := 256; FirstVisibleDate := '1/3/2002'; LevelCount := 2; end; with Items do begin h := AddItem('Task 1'); AddBar(h,'Task','1/4/2002','1/8/2002','A',Nil); end; EndUpdate(); end |
1516 |
How can I apply colors to columns section of the control based on properties of the displaying bars
// BarResize event - Occurs when a bar is moved or resized. procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent); begin with AxG2antt1 do begin Refresh(); end end; with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('<fgcolor=FF0000>Tasks > 2 days') as EXG2ANTTLib.Column) do begin HTMLCaption := Caption; end; with (Columns.Add('PropertyBar') as EXG2ANTTLib.Column) do begin Visible := False; Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(513); end; Items.AllowCellValueToItemBar := True; with Chart do begin LevelCount := 2; FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 96; NonworkingDays := 0; end; with ConditionalFormats.Add('%1 > 2',Nil) do begin ForeColor := $ff; Bold := True; end; SelBackColor := BackColor; SelForeColor := ForeColor; with Items do begin AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','',Nil); AddBar(AddItem('Task 2'),'Task','1/4/2001','1/7/2001','',Nil); AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','',Nil); end; EndUpdate(); end |
1515 |
Is it possible to update the colors on columns caption to highlight the critical path ( CPM )
// BarResize event - Occurs when a bar is moved or resized. procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent); begin with AxG2antt1 do begin Items.SchedulePDM(e.item,TObject(e.key)); Refresh(); end end; with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with (Columns.Add('PropertyBar') as EXG2ANTTLib.Column) do begin Visible := False; Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(269); end; Items.AllowCellValueToItemBar := True; with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 48; NonworkingDays := 0; end; with ConditionalFormats.Add('%1 != 0',Nil) do begin ForeColor := $ff; Bold := True; end; SelBackColor := BackColor; SelForeColor := ForeColor; with Items do begin h1 := AddItem('Task 1'); AddBar(h1,'Task','1/2/2001','1/4/2001','',Nil); h2 := AddItem('Task 2'); AddBar(h2,'Task','1/2/2001','1/4/2001','',Nil); AddLink('L1',h1,'',h2,''); h3 := AddItem('Task 3'); AddBar(h3,'Task','1/2/2001','1/4/2001','',Nil); AddLink('L2',h2,'',h3,''); h4 := AddItem('Task 3'); AddBar(h4,'Task','1/2/2001','1/3/2001','',Nil); AddLink('L3',h2,'',h4,''); DefSchedulePDM[EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathBarColor] := TObject(255); DefSchedulePDM[EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathLinkColor] := TObject(255); SchedulePDM(0,''); end; EndUpdate(); end |
1514 |
I am using the AddShapeCorner to define icon-bars. Is it possible to define with a different color
with AxG2antt1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 128; with Bars do begin AddShapeCorner(TObject(12345),TObject(1)); with Copy('Milestone','Original') do begin StartShape := EXG2ANTTLib.ShapeCornerEnum($3020 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); StartColor := $ffffffff; end; with Copy('Milestone','Red') do begin StartShape := EXG2ANTTLib.ShapeCornerEnum($3020 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); StartColor := $ff; end; with Copy('Milestone','Green') do begin StartShape := EXG2ANTTLib.ShapeCornerEnum($3020 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); StartColor := $ff00; end; end; end; Columns.Add('Column'); with Items do begin AddBar(AddItem('Original'),'Original','1/2/2001','1/2/2001',Nil,Nil); AddBar(AddItem('Red'),'Red','1/2/2001','1/2/2001',Nil,Nil); AddBar(AddItem('Green'),'Green','1/2/2001','1/2/2001',Nil,Nil); end; EndUpdate(); end |
1513 |
My icon-bars shows different when displaying in the chart. Any ideas
with AxG2antt1 do begin Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); Chart.FirstVisibleDate := '1/1/2001'; with Chart.Bars do begin AddShapeCorner(TObject(12345),TObject(1)); with Item['Milestone'] do begin StartShape := EXG2ANTTLib.ShapeCornerEnum($3020 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); StartColor := $ffffffff; end; end; Columns.Add('Column'); with Items do begin AddBar(AddItem('Item 1'),'Milestone','1/2/2001','1/2/2001',Nil,Nil); end; end |
1512 |
The items are not colored in the chart panel
with AxG2antt1 do begin Chart.PaneWidth[False] := 128; Columns.Add('Default'); with Items do begin h := AddItem('Item'); AxG2antt1.Chart.ItemBackColor[h] := $ff00; AxG2antt1.Items.ItemBackColor[h] := $ff00; end; end |
1511 |
I need to know how to determine the critical path (CPM) after the SchedulePDM procedure, so I can turn red the bars and links
// BarResize event - Occurs when a bar is moved or resized. procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent); begin with AxG2antt1 do begin Items.SchedulePDM(e.item,TObject(e.key)); end end; with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 48; NonworkingDays := 0; end; with Items do begin h1 := AddItem('Task 1'); AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil); h2 := AddItem('Task 2'); AddBar(h2,'Task','1/2/2001','1/4/2001','K2',Nil); AddLink('L1',h1,'K1',h2,'K2'); h3 := AddItem('Task 3'); AddBar(h3,'Task','1/2/2001','1/4/2001','K3',Nil); AddLink('L2',h2,'K2',h3,'K3'); h4 := AddItem('Task 3'); AddBar(h4,'Task','1/2/2001','1/3/2001','K4',Nil); AddLink('L3',h2,'K2',h4,'K4'); DefSchedulePDM[EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathBarColor] := TObject(255); DefSchedulePDM[EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathLinkColor] := TObject(255); SchedulePDM(0,'K1'); end; EndUpdate(); end |
1510 |
How can I display the Year in Thai, Buddhist, Korean format
with AxG2antt1 do begin with Chart do begin FirstWeekDay := LocFirstWeekDay; MonthNames := LocMonthNames; WeekDays := LocWeekDays; AMPM := LocAMPM; LevelCount := 2; PaneWidth[False] := 0; UnitScale := EXG2ANTTLib.UnitEnum.exDay; with Level[0] do begin Label := '<%mmmm%> <%d%>, <%loc_yyyy%> <r><%ww%>'; Unit := EXG2ANTTLib.UnitEnum.exWeek; ToolTip := Label; end; ToolTip := '<%ddd%> <%m%>/<%d%>/<%loc_yyyy%>'; end; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarDateMonths,Chart.MonthNames); set_DefaultEditorOption(EXG2ANTTLib.EditorOptionEnum.exDateMonths,TObject(Chart.MonthNames)); end |
1509 |
How does localization work
with AxG2antt1 do begin with Chart do begin FirstWeekDay := LocFirstWeekDay; MonthNames := LocMonthNames; WeekDays := LocWeekDays; AMPM := LocAMPM; LevelCount := 2; PaneWidth[False] := 0; end; end |
1508 |
Is it possible to show the bars with a different brightness (2)
with AxG2antt1 do begin with VisualAppearance do begin Add(1,'C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task--.ebn'); Add(2,'C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task-.ebn'); Add(3,'C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task.ebn'); Add(4,'C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task+.ebn'); Add(5,'C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task++.ebn'); end; with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 128; NonworkingDays := 0; Bars.Copy('Task','--').Color := $1000000; Bars.Copy('Task','-').Color := $2000000; Bars.Item['Task'].Color := $3000000; Bars.Copy('Task','+').Color := $4000000; Bars.Copy('Task','++').Color := $5000000; end; Columns.Add('Brightness'); with Items do begin h := AddItem('0%'); AddBar(h,'--','1/2/2001','1/4/2001','--',Nil); AddBar(h,'-','1/5/2001','1/7/2001','-',Nil); AddBar(h,'Task','1/8/2001','1/10/2001','',Nil); AddBar(h,'+','1/11/2001','1/13/2001','+',Nil); AddBar(h,'++','1/14/2001','1/16/2001','++',Nil); h := AddItem('25%'); AddBar(h,'--','1/2/2001','1/4/2001','--',Nil); AddBar(h,'-','1/5/2001','1/7/2001','-',Nil); AddBar(h,'Task','1/8/2001','1/10/2001','',Nil); AddBar(h,'+','1/11/2001','1/13/2001','+',Nil); AddBar(h,'++','1/14/2001','1/16/2001','++',Nil); ItemBar[h,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(25); h := AddItem('50%'); AddBar(h,'--','1/2/2001','1/4/2001','--',Nil); AddBar(h,'-','1/5/2001','1/7/2001','-',Nil); AddBar(h,'Task','1/8/2001','1/10/2001','',Nil); AddBar(h,'+','1/11/2001','1/13/2001','+',Nil); AddBar(h,'++','1/14/2001','1/16/2001','++',Nil); ItemBar[h,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(50); h := AddItem('75%'); AddBar(h,'--','1/2/2001','1/4/2001','--',Nil); AddBar(h,'-','1/5/2001','1/7/2001','-',Nil); AddBar(h,'Task','1/8/2001','1/10/2001','',Nil); AddBar(h,'+','1/11/2001','1/13/2001','+',Nil); AddBar(h,'++','1/14/2001','1/16/2001','++',Nil); ItemBar[h,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(75); end; end |
1507 |
Is it possible to show the bars with a different brightness (1)
with AxG2antt1 do begin VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); with Chart do begin Bars.Item['Task'].Color := $1000000; FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 128; end; Columns.Add('Brightness'); with Items do begin h := AddItem('0%'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); h := AddItem('25%'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(25); h := AddItem('50%'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(50); h := AddItem('75%'); AddBar(h,'Task','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(75); end; end |
1506 |
So the behavior I am looking for is that a change can cascade through a bar's successors, but a change that would affect a bar's predecessors is not allowed. Is this possible to in ExG2antt
with AxG2antt1 do begin BeginUpdate(); MarkSearchColumn := False; OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart; Columns.Add('Tasks'); (Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False; (Columns.Add('End') as EXG2ANTTLib.Column).Visible := False; with Chart do begin LevelCount := 2; FirstVisibleDate := '9/18/2006'; PaneWidth[False] := 64; ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exStartDate] := FirstVisibleDate; ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exEndDate] := '12/31/2006'; MarkSelectDateColor := $7fff0000; SelectLevel := 1; SelectDate['9/19/2006'] := True; AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar; AllowLinkBars := False; end; with Items do begin h := AddItem('Project'); CellValue[TObject(h),TObject(1)] := '9/21/2006'; CellValue[TObject(h),TObject(2)] := '10/3/2006'; AddBar(h,'Summary',CellValue[TObject(h),TObject(1)],CellValue[TObject(h),TObject(2)],'sum',Nil); h1 := InsertItem(h,Nil,'Task 1'); CellValue[TObject(h1),TObject(1)] := CellValue[TObject(h),TObject(1)]; CellValue[TObject(h1),TObject(2)] := '9/24/2006'; AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],'K1',Nil); ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '9/20/2006'; h2 := InsertItem(h,Nil,'Task 2'); CellValue[TObject(h2),TObject(1)] := CellValue[TObject(h1),TObject(2)]; CellValue[TObject(h2),TObject(2)] := '9/28/2006'; AddBar(h2,'Unknown',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],'K2',Nil); AddLink('L1',h1,'K1',h2,'K2'); h3 := InsertItem(h,Nil,'Task 3'); CellValue[TObject(h3),TObject(1)] := CellValue[TObject(h2),TObject(2)]; CellValue[TObject(h3),TObject(2)] := CellValue[TObject(h),TObject(2)]; AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],'K3',Nil); AddLink('L2',h2,'K2',h3,'K3'); GroupBars(h1,'K1',False,h2,'K2',True,TObject(31),'0;4'); GroupBars(h2,'K2',False,h3,'K3',True,TObject(31),'0;2'); DefineSummaryBars(h,'sum',h1,'K1'); DefineSummaryBars(h,'sum',h2,'K2'); DefineSummaryBars(h,'sum',h3,'K3'); ExpandItem[h] := True; ItemBold[h] := True; end; EndUpdate(); end |
1505 |
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)
with AxG2antt1 do begin BeginUpdate(); Chart.PaneWidth[True] := 0; MarkSearchColumn := False; with Columns do begin with (Add('Car') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'MAZDA'; end; with (Add('Equipment') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*'; FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern; Filter := 'AIR BAG'; end; end; with Items do begin CellValue[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag'; CellValue[TObject(AddItem('Toyota')),TObject(1)] := 'Air Bag,Air condition'; CellValue[TObject(AddItem('Ford')),TObject(1)] := 'Air condition'; CellValue[TObject(AddItem('Nissan')),TObject(1)] := 'Air Bag,ABS,ESP'; CellValue[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag, ABS,ESP'; CellValue[TObject(AddItem('Mazda')),TObject(1)] := 'ABS,ESP'; end; ApplyFilter(); EndUpdate(); end |
1504 |
How can I have a case-sensitive filter
with AxG2antt1 do begin BeginUpdate(); Chart.PaneWidth[True] := 0; MarkSearchColumn := False; with Columns do begin with (Add('Car') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := Integer(EXG2ANTTLib.FilterTypeEnum.exFilterDoCaseSensitive) Or Integer(EXG2ANTTLib.FilterTypeEnum.exFilter); Filter := 'Mazda'; end; with (Add('Equipment') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*'; FilterType := Integer(EXG2ANTTLib.FilterTypeEnum.exFilterDoCaseSensitive) Or Integer(EXG2ANTTLib.FilterTypeEnum.exPattern); Filter := 'Air Bag'; end; end; with Items do begin CellValue[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag'; CellValue[TObject(AddItem('Toyota')),TObject(1)] := 'Air Bag,Air condition'; CellValue[TObject(AddItem('Ford')),TObject(1)] := 'Air condition'; CellValue[TObject(AddItem('Nissan')),TObject(1)] := 'Air Bag,ABS,ESP'; CellValue[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag, ABS,ESP'; CellValue[TObject(AddItem('Mazda')),TObject(1)] := 'ABS,ESP'; end; ApplyFilter(); EndUpdate(); end |
1503 |
Is it possible to add a custom label to the days with a specified background color
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 48; end; with Items do begin h1 := AddItem('Task 1'); AddBar(h1,'','1/2/2001','1/8/2001','K1','Leave Blank'); ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable] := TObject(False); ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(255); end; EndUpdate(); end |
1502 |
What is the event fired when I change "...Chart.PaneWidthLeft" (or "...Chart.PaneWidthRight") in the Gantt splitter window
// ChartEndChanging event - Occurs after the chart has been changed. procedure TWinForm1.AxG2antt1_ChartEndChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent); begin with AxG2antt1 do begin OutputDebugString( 'End Operation(exVSplitterChange(10)' ); OutputDebugString( e.operation ); OutputDebugString( 'PaneWidth:' ); OutputDebugString( Chart.PaneWidth[False] ); end end; // ChartStartChanging event - Occurs when the chart is about to be changed. procedure TWinForm1.AxG2antt1_ChartStartChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent); begin with AxG2antt1 do begin OutputDebugString( 'Start Operation(exVSplitterChange(10)' ); OutputDebugString( e.operation ); OutputDebugString( 'PaneWidth:' ); OutputDebugString( Chart.PaneWidth[False] ); end end; |
1501 |
I want to ask if I can select more than one bar in the chart and move them together
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Task'); with Chart do begin FirstVisibleDate := '12/29/2000'; PaneWidth[False] := 64; LevelCount := 2; end; with Items do begin AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil); AddBar(AddItem('Task 2'),'Task','1/4/2001','1/6/2001','K2',Nil); AddBar(AddItem('Task 3'),'Task','1/8/2001','1/10/2001','K3',Nil); h := AddItem(''); AddBar(h,'','1/8/2001','1/10/2001','','<b>Right click</b> the chart, start dragging to select multiple bars<br>or click a bar while pressing the <b>CTRL</b> key'); ItemHeight[h] := 36; ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable] := TObject(False); end; EndUpdate(); end |